# Contributor: Aji Kisworo Mukti <aji.kisworo.mukti@gmail.com>
# Maintainer:
pkgname=jpegoptim
pkgver=1.4.7
pkgrel=0
pkgdesc="JPEG optimization utility"
url="https://github.com/tjko/jpegoptim"
arch="all"
license="GPL-2.0-or-later"
makedepends="libjpeg-turbo-dev"
options="!check" # no testsuite
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/tjko/jpegoptim/archive/RELEASE.$pkgver.tar.gz"
builddir="$srcdir/$pkgname-RELEASE.$pkgver"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--target=$CTARGET \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
d7f3942399b760c844fae7a63c50a933212c5c8fa32e3217e1117fb1e8c5cd4b53c844f257e216aead79cd1d4d593a75121b92df7543d6da0db03b3de791e3a8  jpegoptim-1.4.7.tar.gz
"
